package com.mdx.order.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author : jiagang
 * @date : Created in 2024/3/15 14:26
 */
@RestController
public class RabbitMqTest {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @GetMapping("/send")
    public String send(){
        rabbitTemplate.convertAndSend("directExchange", "addTaskRouting", "hello word!!");
        return "success" + System.currentTimeMillis();
    }
}
